<?php
/**
 * Created by PhpStorm.
 * User: LiuJiaJun
 * Date: 2018/11/18
 * Time: 21:41
 */

namespace app\storage\controller;

use app\storage\model\InflowModel;
use app\storage\service\CommonService;
use cmf\controller\AdminBaseController;
use think\Request;


class InflowController extends AdminBaseController
{
    private $commonService;
    private $inflowModel;
    use \app\storage\util\Common;
    public function __construct(CommonService $commonService, InflowModel $inflowModel,Request $request = null)
    {
        parent::__construct($request);
        $this->inflowModel = $inflowModel;
        $this->commonService = $commonService;
    }

    /**
     * 调用入库流水视图
     */
    public function index()
    {
        $assign = $this->getAssignStorage();
        $this->assign($assign);
        return $this->fetch('index');
    }

    /**
     * 获取入库流水信息
     */
    public function getInflow()
    {
        $where = $this->getWhere();
        $result = $this->inflowModel->getInflow($where);
        return json($result);
    }


}